#include <iostream>

using namespace std;

class List
{
	friend class Head;

	private:
		List* next;
		List* previous;
		int value;
	public:
		List(int v = 0, List* p = NULL, List* n = NULL )
		{
			next = n;
			previous = p;
			value = v;
		}
};

class Head
{
	private:
		List* head;
		List* lastNode;
	public:
		Head(List* h = NULL)
		{
			head = h;
		}
		~Head();
		void createList(int num);
		void printList();
		void reversePrint();
		void quickSort();
};